<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>模板引擎的使用</title>
</head>
<body>
  
  <script src="./node_modules/art-template/lib/template-web.js"></script>
  <script type="text/template" id="tpl">
    大家好，我叫 {{ name }}
    我来自{{ address }}
    我喜欢: {{ each hobbies }} {{ $value }} {{ /each }}
  </script>
  <script>
    let res = template('tpl', {
      name: 'jack',
      address: '武汉',
      hobbies: ['乒乓球', '游戏']
    })
    console.log(res);
  </script>
</body>
</html>